
import 'package:flutter/material.dart';

class DefineDialog extends Dialog {

  final Widget? child;

  const DefineDialog({Key? key,required this.child}):super(key: key);

  @override
  Widget build(BuildContext context) {
    return Dialog(
      //背景色
      backgroundColor: Colors.transparent,
      //出现动画
      insetAnimationCurve: Curves.easeInCubic,
      //动画时间
      insetAnimationDuration: const Duration(milliseconds: 300),
      child: Container(
        decoration: BoxDecoration(color: Colors.indigo,borderRadius: BorderRadius.circular(20)),
        width: 200,
        height: 200,
        child: child,
      ),
    );

    //const Dialog({
    //     super.key,
    //     this.backgroundColor,
    //     this.elevation,
    //     this.shadowColor,
    //     this.surfaceTintColor,
    //     this.insetAnimationDuration = const Duration(milliseconds: 100),
    //     this.insetAnimationCurve = Curves.decelerate,
    //     this.insetPadding = _defaultInsetPadding,
    //     this.clipBehavior = Clip.none,
    //     this.shape,
    //     this.alignment,
    //     this.child,
    //   })
  }
}